package xyz.robinbingo.leetcode.a20.b06.c11;

public class Solution {
    public int[] dailyTemperatures(int[] T) {
        int length = T.length;
        int[] result = new int[length];
        for (int i = 0; i < length; i++) {
            int a = T[i];
            for (int j = i + 1; j < length; j++) {
                if (T[j] > a) {
                    result[i] = j - i;
                    break;
                }
            }
        }
        return result;
    }
}